package com.zjy.pgcms.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import lombok.Data;

import java.io.Serializable;

/**
 *
 * @TableName pet
 */
@TableName(value ="pet")
@Data
public class Pet implements Serializable {
    /**
     * 
     */
    @TableId(type = IdType.ASSIGN_ID)
    @JsonSerialize(using = ToStringSerializer.class)
    private Long id;

    @JsonSerialize(using = ToStringSerializer.class)
    private Long userId;

    /**
     * 
     */
    private String name;

    /**
     * 
     */
    private String variety;

    /**
     * 
     */
    private Integer age;

    /**
     * 
     */
    private Byte gender;

    /**
     * 
     */
    private Double weight;

    /**
     * 
     */
    private String avatarUrl;

    /**
     * 删除状态
     */
    @TableLogic
    private Byte deleteStatus;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    public Pet(Long userId, String name, String variety, Integer age, Byte gender, Double weight) {
        this.userId = userId;
        this.name = name;
        this.variety = variety;
        this.age = age;
        this.gender = gender;
        this.weight = weight;
    }

    public Pet(Long id, Long userId, String name, String variety, Integer age, Byte gender, Double weight) {
        this.id = id;
        this.userId = userId;
        this.name = name;
        this.variety = variety;
        this.age = age;
        this.gender = gender;
        this.weight = weight;
    }

    public Pet(Long id, Long userId, String name, String variety, Integer age, Byte gender, Double weight, String avatarUrl, Byte deleteStatus) {
        this.id = id;
        this.userId = userId;
        this.name = name;
        this.variety = variety;
        this.age = age;
        this.gender = gender;
        this.weight = weight;
        this.avatarUrl = avatarUrl;
        this.deleteStatus = deleteStatus;
    }
}